package com.gitee.wsl.data.input


 interface EventStrategy<Inputs : Any, Events : Any, State : Any> {

     suspend fun EventStrategyScope<Inputs, Events, State>.start()

     suspend fun enqueue(event: Events)

    /**
     * Immediately mark the InputStrategy as closed. After this function returns, no more Inputs may be sent to the VM,
     * though anything currently in the queue may still be processed.
     */
     fun close()

    /**
     * Suspend until everything in the queue has been fully processed.
     */
     suspend fun flush()
}


 interface EventStrategyScope<Inputs : Any, Events : Any, State : Any> {

     suspend fun dispatchEvent(event: Events)
}

